
public class e040 {
    public static void main(String[] args) {
        long sTime = System.currentTimeMillis();
        StringBuilder b = new StringBuilder();
        b.append("0.");
        for (int i = 1; i < 1000000; i++) {
            b.append(i);
        }
        int[] num = {1, 10, 100, 1000, 10000, 100000, 1000000};
        long product = 1;
        for (int n : num) {
            product *= Integer.parseInt(String.valueOf(b.charAt(n + 1)));
        }
        System.out.println(product);
        long fTime = System.currentTimeMillis();
        System.out.println("Time: " + (fTime - sTime) + "ms");
    }
}